package com.yachang.qym.usbhost.activity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.view.WindowManager;
import android.webkit.WebView;

import com.yachang.qym.usbhost.R;

public class HelpDocActivity extends AppCompatActivity {

    private Toolbar mToolbar;
    private WebView webView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_help_doc);
        mToolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(mToolbar);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setTitle("蛛网对讲机APP使用说明书");
        webView = (WebView) findViewById(R.id.help_web);
        webView.loadUrl("http://www.cdyachang.com:8080/app_help.html");
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    }


    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()){
            case android.R.id.home :
                HelpDocActivity.this.finish();
                break;
        }
        return super.onOptionsItemSelected(item);
    }
}
